package initialize

import (
	"com.smyx/cache"
	"encoding/json"
	"log"
	"os"
)

func LoadAgentConfig() {
	content, err := os.ReadFile("config.json")
	if err != nil {
		panic(err)
	}
	log.Println(string(content))
	err = json.Unmarshal(content, &cache.CfgStruct)
	if err != nil {
		log.Printf("YH-000:解析config.json配置文件报错：%v", err)
		os.Exit(1)
	}
}
